package com.shopnight.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.shopnight.entity.TakeoutMerchantCategory;
import com.shopnight.service.TakeoutMerchantCategoryService;
import com.shopnight.mapper.TakeoutMerchantCategoryMapper;
import com.shopnight.vo.TakeoutCategoryGoodsVo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* @author 13201
* @description 针对表【takeout_merchant_category】的数据库操作Service实现
* @createDate 2023-03-09 20:37:40
*/
@Service
public class TakeoutMerchantCategoryServiceImpl extends ServiceImpl<TakeoutMerchantCategoryMapper, TakeoutMerchantCategory>
    implements TakeoutMerchantCategoryService{

    @Autowired
    TakeoutMerchantCategoryMapper takeoutMerchantCategoryMapper;

    @Override
    public List<TakeoutMerchantCategory> getTakeoutCategoty(Integer orgId) {
        List<TakeoutMerchantCategory> takeoutMerchantCategories = takeoutMerchantCategoryMapper.selectList(
                new LambdaQueryWrapper<TakeoutMerchantCategory>()
                        .eq(TakeoutMerchantCategory::getOrgId,orgId)
                        .orderByAsc(TakeoutMerchantCategory::getSort)
        );
        return takeoutMerchantCategories;
    }


}




